/**
 * Author shuqi
 * Rev
 * Date: 2021-08-18 23:00
 * <p>
 * Copyright (C) 2021 Seeyon, Inc. All rights reserved.
 * <p>
 * This software is the proprietary information of Seeyon, Inc.
 * Use is subject to license terms.
 * @company seeyon.com
 * @since V5 V7.1
 * @author shuqi
 */
package com.lagou.handler;

import com.lagou.Request;
import com.lagou.Response;
import com.lagou.config.ServletConfig;

import java.util.Map;

/**
 * @description
 * @date 2021-08-18 23:00
 * @author xiaol
 */
public class ContextHandler extends AbstractHandler {

	@Override
	public void handleRequest(Request request, Response response) {
		Map<String, String> servletMapper = ServletConfig.getServletMapper();
		String path = request.getHost() + request.getContext() + request.getUrl();
		if(servletMapper.containsKey(path)){
			this.getNextHandler().handleRequest(request,response);
		}
	}
}
